package ro.myApp.articles.service.basic;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import ro.myApp.commons.basic.PersistentEntity;
import ro.myApp.commons.service.EntityActionServiceImpl;
import ro.myApp.commons.utils.CustomAssertion;

public abstract class ArticlesActionService<E extends PersistentEntity> extends
		EntityActionServiceImpl<E> {
	
	@PersistenceContext(unitName = "ArticlePU")
	private EntityManager em;

	@Override
	protected EntityManager getEm() {
		CustomAssertion.assertNotNull(em, "big problem with "
				+ "entity manager and persistence unit on security module");
		return em;
	}
}
